﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace PM.Web.Admin
{
    public partial class admin_stop_list : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                bindDDL();
                bindData();
            }
        }

        private void bindDDL()
        {
            DataAccess.PmData dal = new DataAccess.PmData();
            this.ddlComList.DataSource = dal.GetCommunity(int.Parse(Session["CommId"].ToString()), true);
            this.ddlComList.DataBind();

        }

        private void bindData()
        {
            DataAccess.PmData dal = new DataAccess.PmData();
            this.repStopViewList.DataSource = dal.Get_StopView(int.Parse(this.ddlComList.SelectedValue), null);
            this.repStopViewList.DataBind();
        }

        protected void lnkQuery_Click(object sender, EventArgs e)
        {
            bindData();
        }
    }
}